var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    listData:''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    that.setData({
      opid: options.openOId,
      money: options.yue
    });
    
    wx.showLoading({
      title: '加载中...',
    });
          

    wx.request({
      url: app.globalData.phpUrl + 'user/api',
      method: 'POST',
      data: { api_name: 'money_log', openid: that.data.opid},
      success:function(res){
        if(res.data.code == 1){
          console.log(res.data.data)
          that.setData({
            listData: res.data.data.list
          })
          wx.hideLoading()
        }else{
          wx.showToast({
            title: '查询失败!',
            image: '../../../../images/attend.png',
            duration: 2000
          })
          wx.hideLoading()
        }
      }
    })
  }
})